<template>
  <input type="text" v-model.lazy="to" />

  <h1>{{ parseInt(from) }}</h1>
</template>

<script setup>
import { ref, watch } from 'vue'
import { gsap } from 'gsap'

const from = ref(0)
const to = ref(0)

watch(to, (nextValue) => {
  // from.value = nextValue
  // gsap.to(对象, {配置})
  gsap.to(from, { value: nextValue, duration: 0.5 })
})
</script>

<style scoped></style>
